package com.huangkailong.gitimgbed.viewmodel;

import de.saxsys.mvvmfx.ViewModel;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

/**
 * @author huangkl
 * @since 1.0.0
 */
public class SettingViewModel implements ViewModel {
    /**
     * git 仓库 url
     */
    private final StringProperty gitRepositoryUrl = new SimpleStringProperty();
    /**
     * git 仓库分支
     */
    private final StringProperty gitRepositoryBranch = new SimpleStringProperty();
    /**
     * git 仓库本地保存地址
     */
    private final StringProperty gitRepositoryLocalPath = new SimpleStringProperty();
    /**
     * git 登录用户名
     */
    private final StringProperty gitUsername = new SimpleStringProperty();
    /**
     * git 登录密码
     */
    private final StringProperty gitPasswd = new SimpleStringProperty();
    /**
     * 获取图片 url 前缀
     */
    private final StringProperty imgUrlPrefix = new SimpleStringProperty();

    public String getGitRepositoryUrl() {
        return gitRepositoryUrl.get();
    }

    public StringProperty gitRepositoryUrlProperty() {
        return gitRepositoryUrl;
    }

    public void setGitRepositoryUrl(String gitRepositoryUrl) {
        this.gitRepositoryUrl.set(gitRepositoryUrl);
    }

    public String getGitRepositoryBranch() {
        return gitRepositoryBranch.get();
    }

    public StringProperty gitRepositoryBranchProperty() {
        return gitRepositoryBranch;
    }

    public void setGitRepositoryBranch(String gitRepositoryBranch) {
        this.gitRepositoryBranch.set(gitRepositoryBranch);
    }

    public String getGitRepositoryLocalPath() {
        return gitRepositoryLocalPath.get();
    }

    public StringProperty gitRepositoryLocalPathProperty() {
        return gitRepositoryLocalPath;
    }

    public void setGitRepositoryLocalPath(String gitRepositoryLocalPath) {
        this.gitRepositoryLocalPath.set(gitRepositoryLocalPath);
    }

    public String getGitUsername() {
        return gitUsername.get();
    }

    public StringProperty gitUsernameProperty() {
        return gitUsername;
    }

    public void setGitUsername(String gitUsername) {
        this.gitUsername.set(gitUsername);
    }

    public String getGitPasswd() {
        return gitPasswd.get();
    }

    public StringProperty gitPasswdProperty() {
        return gitPasswd;
    }

    public void setGitPasswd(String gitPasswd) {
        this.gitPasswd.set(gitPasswd);
    }

    public String getImgUrlPrefix() {
        return imgUrlPrefix.get();
    }

    public StringProperty imgUrlPrefixProperty() {
        return imgUrlPrefix;
    }

    public void setImgUrlPrefix(String imgUrlPrefix) {
        this.imgUrlPrefix.set(imgUrlPrefix);
    }

    @Override
    public String toString() {
        return "SettingViewModel{" +
                "gitRepositoryUrl=" + gitRepositoryUrl +
                ", gitRepositoryBranch=" + gitRepositoryBranch +
                ", gitRepositoryLocalPath=" + gitRepositoryLocalPath +
                ", gitUsername=" + gitUsername +
                ", gitPasswd=" + gitPasswd +
                ", imgUrlPrefix=" + imgUrlPrefix +
                '}';
    }
}
